package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.ProjectExceptionUsers;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 开工令异常责任人Mapper接口
 *
 * @author qijian
 * @date 2023-09-28
 */
public interface ProjectExceptionUsersMapper extends BaseMapper<ProjectExceptionUsers> {

    @Select("select count(0) from main_project_exception_users WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    @Delete("delete from main_project_exception_users where main_id = #{mainId} and version != #{version}")
    int deleteByMainId(Long mainId,String version);
}
